import YchConstant from "@/api/YchConstant"; //接口模块配置项
import { axios } from "@/utils/request"; //请求

const responseType = "blob"
// --------------------------审评员个人信息-----------------------------
// 获取基本信息数据
export const queryMyJbxx = function (params) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/myJbxx/queryMyJbxx",
    method: "GET",
    params,
    url_1:'outside'
  });
};

// 保存基本信息数据
export const updateUser = function (data) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/myJbxx/updateUser",
    method: "POST",
    data,
    url_1:'outside'
  });
};


// 更新核查员信息
export const updateHcy = function (data) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/myJbxx/updateHcy",
    method: "POST",
    data,
    url_1:'outside'
  });
};

// 获取选派记录
export const queryMyXpjl = function (params) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/myJbxx/queryMyXpjl",
    method: "GET",
    params,
    url_1:'outside'
  });
};

// 获取我的调派信息
export const queryMyDpxx = function (params) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/myJbxx/queryMyDpxx",
    method: "GET",
    params,
    url_1:'outside'
  });
};

// 获取我的考核信息
export const queryMyKhxx = function (params) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/myJbxx/queryMyKhxx",
    method: "GET",
    params,
    url_1:'outside'
  });
};


// 用户培训记录-分页列表查询
export const sysQueryPageList = function (params) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserPxjl/queryPageList",
    method: "GET",
    params,
    url_1:'outside'
  });
};
// 下载培训记录-导入模板
export const sysDownUserPxjlTemplate = function (params) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserPxjl/downUserPxjlTemplate",
    method: "GET",
    params,
    responseType,
    url_1:'outside'
  });
};

// 导出培训记录数据-表格excel
export const sysExportUserPxjlData = function (params) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserPxjl/exportUserPxjlData",
    method: "GET",
    params,
    responseType,
    url_1:'outside'
  });
};


// 导入培训记录
export const sysImpPxjlData = function (data) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserPxjl/impPxjlData",
    method: "POST",
    data,
    url_1:'outside'
  });
};



// 用户培训记录-添加
export const sysAddPxjl = function (data) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserPxjl/addPxjl",
    method: "POST",
    data,
    url_1:'outside'
  });
};

// 用户培训记录-批量删除
export const sysDeleteBatch = function (ids) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserPxjl/deleteBatch",
    method: "delete",
    params:{ids:ids},
    url_1:'outside'
  });
};

// 用户培训记录-批量删除
export const sysEditPxjl = function (data) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserPxjl/editPxjl",
    method: "put",
    data,
    url_1:'outside'
  });
};

// 用户培训记录-通过id查询
export const sysQueryById = function (id) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserPxjl/queryById",
    method: "GET",
    params:{id:id},
    url_1:'outside'
  });
};
// 查看培训记录-相关文件
export const queryPxjlFileList = function (id) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserPxjl/queryPxjlFileList",
    method: "GET",
    params:{id:id},
    url_1:'outside'
  });
};
// 培训记录文件-上传
export const uploadPxjlFile = function (data) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserPxjl/uploadPxjlFile",
    method: "POST",
    data,
    url_1:'outside',
    responseType: 'arraybuffer'
  });
};
// 培训记录文件-删除
export const deletePxjlFileById = function (id) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserPxjl/deletePxjlFileById",
    method: "delete",
    params:{...id},
    url_1:'outside'
  });
};
// 培训记录文件-下载
export const getPxjlFile = function (id) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserPxjl/getPxjlFile",
    method: "GET",
    params:{id:id},
    url_1:'outside'
  });
};

// 工作

// 用户工作记录-分页列表查询
export const GzQueryPageList = function (params) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserGzjl/queryPageList",
    method: "GET",
    params,
    url_1:'outside'
  });
};
// 下载工作记录-导入模板
export const GzDownUserPxjlTemplate = function (params) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserGzjl/downUserGzjlTemplate",
    method: "GET",
    params,
    responseType,
    url_1:'outside'
  });
};
// 导出工作记录数据-表格excel
export const GzExportUserPxjlData = function (params) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserGzjl/exportUserGzjlData",
    method: "GET",
    params,
    responseType,
    url_1:'outside'
  });
};
// 导入工作记录
export const GzImpPxjlData = function (data) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserGzjl/impGzjlData",
    method: "POST",
    data,
    url_1:'outside'
  });
};

// 用户工作记录-添加
export const GzAddPxjl = function (data) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserGzjl/addGzjl",
    method: "POST",
    data,
    url_1:'outside'
  });
};
// 用户工作记录-批量删除
export const GzDeleteBatch = function (ids) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserGzjl/deleteBatch",
    method: "delete",
    params:{ids:ids},
    url_1:'outside'
  });
};
// 用户工作记录-编辑
export const GzEditPxjl = function (data) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserGzjl/editGzjl",
    method: "put",
    data,
    url_1:'outside'
  });
};
// 用户工作记录-通过id查询
export const GzQueryById = function (id) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserGzjl/queryById",
    method: "GET",
    params:{id:id},
    url_1:'outside'
  });
};



// 教育
// 用户教育记录-分页列表查询
export const JyQueryPageList = function (params) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserJyjl/queryPageList",
    method: "GET",
    params,
    url_1:'outside'
  });
};
// 下载教育记录-导入模板
export const JyDownUserPxjlTemplate = function (params) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserJyjl/downUserJyjlTemplate",
    method: "GET",
    params,
    responseType,
    url_1:'outside'
  });
};

// 导出教育记录数据-表格excel
export const JyExportUserPxjlData = function (params) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserJyjl/exportUserGzjlData",
    method: "GET",
    params,
    responseType,
    url_1:'outside'
  });
};
// 导入教育记录
export const JyImpPxjlData = function (data) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserJyjl/impJyjlData",
    method: "POST",
    data,
    url_1:'outside'
  });
};

// 用户教育记录-添加
export const JyAddPxjl = function (data) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserJyjl/addJyjl",
    method: "POST",
    data,
    url_1:'outside'
  });
};

// 用户教育记录-批量删除
export const JyDeleteBatch = function (ids) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserJyjl/deleteBatch",
    method: "delete",
    params:{ids:ids},
    url_1:'outside'
  });
};
// 用户教育记录-编辑
export const JyEditPxjl = function (data) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserJyjl/editJyjl",
    method: "put",
    data,
    url_1:'outside'
  });
};
// 用户教育记录-通过id查询
export const JyQueryById = function (id) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserJyjl/queryById",
    method: "GET",
    params:{id:id},
    url_1:'outside'
  });
};


//用户奖惩-列表
export const JcQkqueryPageList = function (params) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserJlcfqk/queryPageList",
    method: "GET",
    params:params,
    url_1:'outside'
  });
};

// 用户奖惩-导出模板
export const exportUserJlcfqkData = function(params) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserJlcfqk/downUserJlcfqkTemplate",
    method: "get",
    params:params,
    url_1:'outside',
    responseType,
  });
}
// 用户奖惩-导出数据
export const exportUserJlcfqkDataFile = function(params) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserJlcfqk/exportUserJlcfqkData",
    method: "GET",
    params:params,
    url_1:'outside',
    responseType,
  });
}

// 用户奖惩-添加数据
export const sysUserJlcfqkAdd = function(params) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserJlcfqk/addJcqk",
    method: "post",
    data:params,
    url_1:'outside',
  });
}


// 用户奖惩-根据id查询数据
export const exportUserJlcfqkQueryById = function(params) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserJlcfqk/queryById",
    method: "GET",
    params:{id:params},
    url_1:'outside',
  });
}

// 用户奖惩-编辑数据
export const sysUsereditJcqk= function(params) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserJlcfqk/editJcqk",
    method: "put",
    data:params,
    url_1:'outside',
  });
}


// 用户奖惩-删除数据
export const sysUserDeleteBatchJcqk= function(id) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/sysUserJlcfqk/deleteBatch",
    method: "delete",
    params:{id:id},
    url_1:'outside',
  });
}

// 用户下载个人签名
export const userSignatureDownload = function(params) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/myJbxx/downMyQm",
    method: "GET",
    params:params,
    url_1:'outside',
    responseType,
  });
}


export const userSignatureImport = function (data) {
  return axios({
    url: YchConstant.SPZX_SPCY + "/myJbxx/uploadMyQm",
    method: "POST",
    data,
    url_1:'outside'
  });
};

export function modifyServe(data){
  return axios({
    ...data,
    url_1:'outside',
  })
}
